package com.xtm.exercise.mq.receiver;

import com.xtm.exercise.mq.base.ProductInfo;
import com.xtm.exercise.mq.base.TopicConst;
import com.xtm.mq.common.annotation.MqMessageListener;
import com.xtm.mq.common.service.MqListener;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
//@MqMessageListener(topic = TopicConst.XTM_SERVICE_PRODUCT_TOPIC, group = TopicConst.XTM_SERVICE_PRODUCT_GROUP)
public class MQProductReceiver implements MqListener<ProductInfo> {

    /**
     * 消费消息
     */
    @Override
    public void onMessage (ProductInfo s) {
        log.info("接到了商品消息：{}", s);
    }

}
